home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / misc / wb_41e.zip / EDITFILE.WB_ < prev    next >
Text File  |  1992-11-19  |  1KB  |  46 lines

  1. EditFormat=`WWWDLGED,4.0`
  2. EditCaption=`Edit File`
  3. EditX=80
  4. EditY=40
  5. EditWidth=150
  6. EditHeight=170
  7. EditNumControls=14
  8. Edit01=`5,3,40,DEFAULT,STATICTEXT,DEFAULT,"&Directory:"`
  9. Edit02=`42,3,100,DEFAULT,VARYTEXT,editfile,""`
  10. Edit03=`5,15,80,DEFAULT,EDITBOX,editfile,""`
  11. Edit04=`5,30,40,DEFAULT,STATICTEXT,DEFAULT,"&File:"`
  12. Edit05=`5,43,80,125,FILELISTBOX,editfile,DEFAULT`
  13. Edit06=`98,17,44,DEFAULT,CHECKBOX,backup,"Make &BAK",1`
  14. Edit07=`98,40,40,DEFAULT,RADIOBUTTON,state,"No&rmal",1`
  15. Edit08=`98,52,40,DEFAULT,RADIOBUTTON,state,"&Zoomed",2`
  16. Edit09=`98,64,40,DEFAULT,RADIOBUTTON,state,"&Iconized",3`
  17. Edit10=`95,82,44,DEFAULT,PUSHBUTTON,DEFAULT,"&Notepad",1`
  18. Edit11=`95,98,44,DEFAULT,PUSHBUTTON,DEFAULT,"&WinEdit",2`
  19. Edit12=`95,114,44,DEFAULT,PUSHBUTTON,DEFAULT,"Wri&te",3`
  20. Edit13=`95,130,44,DEFAULT,PUSHBUTTON,DEFAULT,"WinW&ord",4`
  21. Edit14=`91,151,52,DEFAULT,PUSHBUTTON,DEFAULT,"&Cancel",0`
  22.  
  23. editfile = "*.*"
  24. backup = 1
  25. state = 2
  26.  
  27. :showdlg
  28. retval = Dialog("Edit")
  29. If FileExist(editfile) == @FALSE Then Goto showdlg
  30.  
  31. If backup == 0 Then Goto nobak
  32. bakfile = StrCat(FileRoot(editfile), ".BAK")
  33. FileCopy(editfile, bakfile, @TRUE)
  34.  
  35. :nobak
  36. If state == 1 Then runcmd = "Run"
  37. Else If state == 2 Then runcmd = "RunZoom"
  38. Else runcmd = "RunIcon"
  39.  
  40. If retval == 1 Then editor = "notepad.exe"
  41. Else If retval == 2 Then editor = "winedit.exe"
  42. Else If retval == 3 Then editor = "write.exe"
  43. Else editor = "winword.exe"
  44.  
  45. %runcmd%(editor, editfile)
  46.